package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.HashMap;

/**
 * @InterfaceName: UserMapper
 * @Author: YuanDing
 * @Date: 2024/2/4 20:37
 * @Description:
 */

@Mapper
public interface UserMapper {


    User selectUserByOpenId(String openId);

    void insertUser(User user);

    @Select("select * from user where id = #{userId}")
    User getById(Long userId);

    /**
     * 根据条件查询
     * @param map
     * @return
     */
    Integer selectByMap(HashMap<String, LocalDateTime> map);
}
